<template>
  <div>
    编码：
    <el-input v-model="innerValue"/>
    文本：
    <el-input v-model="innerText"/>

    <el-button @click="updateValue">更新</el-button>
  </div>
</template>
<script>

export default {
  props: {
    value: {
      type: String,
      default: ''
    },
    text: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      innerValue: '',
      innerText: ''
    }
  },
  methods: {
    updateValue() {
      this.$emit('update:text', this.innerText)
      this.$emit('update:value', this.innerValue)
    }
  },
}
</script>
